package com.crm.jdy.service.drp;

import com.crm.jdy.common.dto.WAssetInfoDto;
import com.crm.jdy.common.mapper.FRecordInfoMapper;
import com.crm.jdy.common.pojo.TeamInfo;
import com.crm.jdy.common.pojo.WAssetInfo;
import com.crm.jdy.common.mapper.WAssetInfoMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**   
 * @Description:(固定资产表信息服务实现)
 *
 * @version: V1.0
 * @author: kong
 * 
 */
@Service(version = "${service.version}")
@Component
public class WAssetInfoServiceImpl  extends ServiceImpl<WAssetInfoMapper,WAssetInfo> implements WAssetInfoService  {


    @Autowired
    WAssetInfoMapper wAssetInfoMapper;

    @Override
    public PageInfo<WAssetInfo> seleteWAssetInfo(WAssetInfoDto wOutInfo) {
        PageHelper.startPage( wOutInfo.getCurrentPage(),wOutInfo.getPageSize());
        List<WAssetInfo> bookList = wAssetInfoMapper.seleteWAssetInfo(wOutInfo);
        PageInfo<WAssetInfo> pageInfo = new PageInfo<WAssetInfo>(bookList);
        return pageInfo;
    }

    @Override
    public boolean updateWAssetInfo(WAssetInfo wOutInfo) {
        return wAssetInfoMapper.updateById(wOutInfo) > 0;
    }

    @Override
    public boolean addWAssetInfo(WAssetInfo wOutInfo) {
        return wAssetInfoMapper.insert(wOutInfo) > 0;
    }

    @Override
    public boolean removeWAssetInfo(String assetId) {
        return wAssetInfoMapper.deleteById(assetId) > 0;
    }
}